package com.bussiness.system.config;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @Author: xlr
 * @Date: Created in 下午11:45 2018/8/29
 */
public class WebAppConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //拦截
        String pathPatter = "/*";
        //不拦截
        String excludePathPatterns = "sys/user/login";
        //注册自定义拦截器，添加拦截路径和排除拦截路径
        registry.addInterceptor(new InterceptorConfig()).addPathPatterns(pathPatter).excludePathPatterns(excludePathPatterns);
    }


}
